import request from '@/utils/request'

// 查询角色列表
export function findRoleList(id, isDataRole, name, pageIndex, pageSize) {
  return request({
    url: '/authority/auRole/queryList',
    method: 'get',
    params: { id, isDataRole, name, pageIndex, pageSize }
  })
}

// 查询角色详情
export function findRoleDetail(id) {
  return request({
    url: '/authority/auRole/detail',
    method: 'get',
    params: { id }
  })
}

// 删除角色
export function deleteRole(id) {
  return request({
    url: '/authority/auRole/delete',
    method: 'delete',
    params: { id }
  })
}

// 添加角色
export function createRoleAdd(data) {
  return request({
    url: '/authority/auRole/add',
    method: 'post',
    data
  })
}

// 修改角色
export function updateRole(data) {
  return request({
    url: '/authority/auRole/update',
    method: 'put',
    data
  })
}

